//
//  userTokens.swift
//  我的微博
//
//  Created by 吴加将 on 15/9/9.
//  Copyright © 2015年 吴加将. All rights reserved.
//

import UIKit

class userTokens: NSObject  {
    /// 用于调用access_token，接口获取授权后的access token
    var access_token: String?
    /// access_token的生命周期，单位是秒数 - 准确的数据类型是`数值`
    var expires_in: NSTimeInterval = 0
    /// 当前授权用户的UID
    var uid: String?
    //字典转模型
    convenience init(dict:[String:AnyObject]){
        self.init()

        setValuesForKeysWithDictionary(dict)
    }
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {}

    override var description : String {
    let tokens = ["access_token", "expires_in", "uid"]
        print("\(dictionaryWithValuesForKeys(tokens))")
        return "\(dictionaryWithValuesForKeys(tokens))"
    }
//    override var description: String {
//        let properties = ["access_token", "expires_in", "uid"]
//        
//        return "\(dictionaryWithValuesForKeys(properties))"
//    }

}
